home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / File class library / headers / CIsleDataFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.6 KB  |  64 lines  |  [TEXT/KAHL]

  1. /*
  2.  
  3.   CIsleDataFile.h
  4.   Superclass:    CIsleFile
  5.  
  6.      CDataFile transplanted into CIsleFile
  7.  
  8.   March 20, 1992  isl
  9.   
  10. */
  11.  
  12. /*=====================*/
  13. /*===---------------===*/
  14.  
  15.  
  16. /******************************************************************************
  17.  CIsleDataFile.h
  18.  
  19.         Interface for the Data File Class
  20.         
  21.         Copyright © 1989 Symantec Corporation. All rights reserved.
  22.         
  23.     TCL 1.1 CHANGES
  24.     [
  25.         -     changed interface of all methods returning OSErr. Most 
  26.             now return void, except GetLength, GetMark, and ReadAll.
  27.             All methods now use the exception mechanism to report failure.
  28.             If you need or prefer the old interface, use the compatibility
  29.             class BDataFile.
  30.     ]
  31.         
  32.  ******************************************************************************/
  33.  
  34. #define _H_CIsleDataFile
  35.  
  36. #include "CIsleFile.h"                        /* Interface for its superclass        */
  37.  
  38. class CIsleDataFile : public CIsleFile {                /* Class Declaration                */
  39.  
  40. public:
  41.                                 /** Instance Variables **/
  42.     short        refNum;                    /* Reference number when open        */
  43.     
  44.  
  45.                                 /** Instance Methods **/
  46.                                     /** Construction/Destruction **/
  47.     void        IDataFile(void);
  48.                                     
  49.                                     /** Accessing **/
  50.     virtual void        SetLength(long aLength);
  51.     virtual long        GetLength( void);
  52.     virtual void        SetMark(long howFar, short fromWhere);
  53.     virtual long        GetMark( void);
  54.     
  55.                                     /** Open/Close **/
  56.     virtual void        Open(SignedByte permission);
  57.     virtual void        Close(void);
  58.     
  59.                                     /** Read/Write **/
  60.     virtual Handle        ReadAll( void);
  61.     virtual void        ReadSome(Ptr info, long howMuch);
  62.     virtual void        WriteAll(Handle contents);
  63.     virtual void        WriteSome(Ptr info, long howMuch);
  64. };